import request from '../../utils/request.js'

let perfix = "webMsg"

// 获取消息数
export const getMsgCounts = () => request({
  method: "get",
  url: `${perfix}/counts`
})


// 获取审核消息列表
export const getExamineMsg = () => request({
  method: "get",
  url: `${perfix}/examineMsgList`
})

// 删除所有已读消息
export const delReadMsg = (type) => request({
  method: "delete",
  url: `${perfix}/delReads?type=${type}`
})


// 设置已读
export const updateRead = (id) => request({
  method: "put",
  url: `${perfix}/updateRead?id=${id}`
})

// 删除单条消息
export const delMsg = (id) => request({
  method: "delete",
  url: `${perfix}/delMsg?id=${id}`
})


// 获取系统消息
export const sysMsgList = () => request({
  method: "get",
  url: `${perfix}/sysMsgList`
})


//设置系统消息为已读
export const updateSysRead = () => request({
  method: "put",
  url: `${perfix}/updateSysRead`
})

// 发现反馈消息
export const sendFeed = (data) => request({
  method: "post",
  url: `${perfix}/sendFeed`,
  data
})

// 获取反馈列表
export const feedMsgList = () => request({
  method: "get",
  url: `${perfix}/feedMsgList`,
})